<style>
    td{
        text-align: center;
        border: 1px solid #5555!important;
    }
    .center {
        text-align: center;
        font-weight:bold;
        background: #f5f5f5;
    }
    th{
        text-align: center;
        background: #f5f5f5;
        border: 1px solid #5555!important;
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <ul class="nav nav-tabs">
            <li {if $second == 0} class="active" {/if}><a href="#first" data-toggle="tab">订单详情</a></li>
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade {if $second == 0} active in{/if} " id="first">
                <div id="toolbar"   class="toolbar hidden">
                    <a href="javascript:;" class="btn btn-primary btn-more" data-id="{$order.id}" data-status="2" data-title="您是否要作废此订单 {$order.nb}"> 作废</a>
                    <a href="javascript:;" class="btn btn-success btn-more " data-id="{$order.id}" data-status="1" data-title="您是否要审核通过此订单 {$order.nb}" > 通过</a>
                </div>
                <table id="table1" class="table table-striped table-bordered table-hover" width="100%">
                    <thead>
                    <tr>
                        <td colspan="10" class="center">北京宏达一甲教育科技有限公司《小学生绘本课堂》发货单  </td>
                    </tr>
                    <tr>
                        <td class="center" colspan="2">日期</td>
                        <td colspan="2">{:date('Y-m-d H:i:s',$order.createtime)}</td>
                        <td class="center" colspan="2">订单号</td>
                        <td colspan="4">{$order.nb}</td>
                    </tr>
                  <tr>
                        <td rowspan="4" class="center"><p><br>发</p><br><p>货</p><br><p>方</p></td>
                        <td class="center">名称</td>
                        <td colspan="2">{$order.nameShipper}</td>
                        <td rowspan="4" class="center"><p><br>收</p><br><p>货</p><br><p>方</p></td>
                        <td class="center">分公司名称</td>
                        <td colspan="4">{$order.nameAgent}</td>
                    </tr>
                    <tr>
                        <td class="center">电话</td>
                        <td colspan="2">{$order.shipperTelephone}</td>
                        <td class="center">分公司收货人</td>
                        <td colspan="4">{$order.consignee}</td>
                    </tr>
                    <tr>
                        <td class="center">地址</td>
                        <td colspan="2">{$order.shipperAddress}</td>
                        <td class="center">分公司电话</td>
                        <td colspan="4">{$order.consigneeTelephone}</td>
                    </tr>
                    <tr>
                        <td colspan="3"></td>
                        <td class="center">分公司地址</td>
                        <td colspan="4">{$order.consigneeAddress}</td>
                    </tr>
                    </thead>
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th colspan="2">产品名称</th>
                        <th>数量</th>
                        <th>定价</th>
                        <th>码洋</th>
                        <th>折扣</th>
                        <th>实洋</th>
                        <th>备注</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php $num=0;?>
                    {foreach name="$orderList" item="vo"}
                        <tr>
                            <td></td>
                            <td colspan="2">{$vo.cname}（ {if $vo.type == 1} 半成品 {else} 成品 {/if}）</td>
                            <td>{$vo.num}</td>
                            <td>{$vo.pricing}</td>
                            <td>{$vo.ministrial}</td>
                            <td>{$vo.discount}</td>
                            <td>{$vo.real_ocean}</td>
                            <td>{$vo.remarks}</td>
                            <td>{$vo.status_text}</td>
                        </tr>
                    <?php $num+=$vo['num'];?>
                    {/foreach}
                        <tr>
                            <td colspan="2" class="center">合计数量：</td>
                            <td>{$num}/件</td>
                            <td colspan="2" class="center">合计码洋</td>
                            <td>{$order.order_price}</td>
                            <td colspan="3" class="center">合计实洋</td>
                            <td>{$order.check_order}</td>
                        </tr>
                        <tr>
                            <td class="center">收货方式</td>
                            <td>{$order.receivingWay}</td>
                            <td class="center">要求到货日期</td>
                            <td>{$order.forArrivalGoodsTime ? date('Y-m-d H:i:s',$order.forArrivalGoodsTime) :''}</td>
                            <td class="center">运费承担方</td>
                            <td>{$order.freightFor}</td>
                            <td class="center">备注</td>
                            <td colspan="3">{$order.remark}</td>
                        </tr>
                    </tbody>
                </table>

                {if $orderlogList}
                <div class="panel-lead"><h4>操作日志</h4></div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>操作人</th>
                        <th>时间</th>
                        <th>操作日志</th>
                    </tr>
                    </thead>
                    <tbody>
                        {foreach name="$orderlogList" item="vo"}
                            <tr>
                                <td>{$vo.username}</td>
                                <td>{:date('Y-m-d H:i:s',$vo.createtime)}</td>
                                <td>{$vo.content}</td>
                            </tr>
                        {/foreach}
                    </tbody>
                </table>
                {/if}
            </div>
            <div class="tab-pane fade {if $second == 1} active in{/if}" id="second">
                <div class="panel-lead"><h4>操作日志</h4></div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>操作人</th>
                        <th>时间</th>
                        <th>操作日志</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="$flowLog" item="vo"}
                    <tr>
                        <td>{$vo.user}</td>
                        <td>{:date('Y-m-d H:i:s',$vo.dateline)}</td>
                        <td>{$vo.content}</td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<div class="hide layer-footer">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">
        <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
    </div>
</div>